﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace simpleHotel.Web
{
    /// <summary>
    /// 
    /// </summary>
    public partial class BookingInfo1 : BasePage
    {
        string paymentType = string.Empty; // 1: pay by card; 2:pay by cash

        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            if (radPayCard.Checked)
            {
                Session.Add("PAYMENTID", "1");
                //Session.Add("CARDHOLDER", txtCardHolder.Text);
                //Session.Add("CARDNUMBER", txtCardNumber.Text);
            }
            else
            {
                Session.Add("PAYMENTID", "2");
            }

            Session.Add("CUSTOMERNAME", txtCustomerName.Text);
            Session.Add("CMND", txtCMND.Text);
            Session.Add("ADDRESS", txtAddress.Text);
            Session.Add("PHONE", txtPhone.Text);
            Session.Add("EMAIL", txtEmail.Text);


            Session.Add("bookinginfo", "1");

            Response.Redirect("~/BookingInfoConfirm.aspx");
        }

        //protected void RadioButton_CheckedChanged(object sender, System.EventArgs e)
        //{

        //    if (radPayCard.Checked)
        //    {
        //        paymentType = "1";
        //        txtCardHolder.Enabled = true;
        //        txtCardNumber.Enabled = true;
        //    }
        //    else
        //    {
        //        paymentType = "2";
        //        txtCardHolder.Enabled = false;
        //        txtCardNumber.Enabled = false;
        //    }
        //}
    }
}